package com.qqt.csr.im.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

/**
 * 人工客服 服务信息
 * @author yang hao
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description="人工客服 服务信息")
@TableName(value = "csr_im_service")
@JsonIgnoreProperties(ignoreUnknown = true)
public class ServiceNode implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
    * 服务id
    */
    @Schema(description="服务id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    /**
    * IP
    */
    @Schema(description="IP")
    private String ip;

    /**
    * 端口
    */
    @Schema(description="端口")
    private Integer port;

    /**
    * 状态
    */
    @Schema(description="状态， 0：下线，1：上线")
    private Integer state;

    /**
    * 创建时间
    */
    @Schema(description="创建时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
    * 
    */
    @Schema(description="更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

}